<!DOCTYPE html>
<html>
<body>
<button type="button" onclick="callArkTS()" style="font-size: 40px;">Web侧调用应用传递的Object!</button>
<p id="webPage">Does Web Call ArkTS Success?</p>
<div>
    学生姓名：<span id="demo1"></span>
</div>
<div>
    学生年龄：<span id="demo2"></span>
</div>


<script>
    function callArkTS() {
         let obj = testObjName.test();
        document.getElementById("webPage").innerHTML = 'Yes, Web Call ArkTS Success';
        document.getElementById("demo1").innerHTML = obj.name;
        document.getElementById("demo2").innerHTML = obj.age;
        console.info('ArkTS Hello World! :' + obj);

    }
</script>
</body>
</html>
<style>
    body{
        width:100%;
        height:auto;
        margin:50px auto;
        text-align:center;
        font-size: 40px;
    }
</style>